package com.ideal.trsdata.util;
import javax.servlet.http.HttpServlet;

import org.apache.log4j.PropertyConfigurator;
/**
 * 
 * <p>
 * Title: Log4jInit.java
 * </p>
 * <p>
 * Description: 
 * </p>
 * @author zhang_zhi
 * @version 1.0
 * @created Jul 19, 2011
 */
public class Log4jInit extends HttpServlet
{

	private static final long serialVersionUID = 7182212939881093850L;

	public void init()
    {
        String prefix = getServletContext().getRealPath("/");
        String file = getInitParameter("log4j-init-file");
        if (file != null)
        {
            PropertyConfigurator.configure(prefix + file);
        }
    }

}
